<style>
	.flex{
		display: flex;
		align-items: center;
	}
	.search-box{
		width: 100%;
		height: 62rpx;
		background: #fff;
		position: relative;
		padding-top: 20rpx;
	}
	.search-input{
		height: 48rpx;
		font-size: 24rpx;
		text-align: center;
		width: 90%;
		margin: 0 auto;
		border-radius: 10rpx;
		background: #eee;
	}
	.search-image{
		position: absolute;
		height: 30rpx;
		width: 30rpx;
		top: 32rpx;
		left: 32%;
	}
	.goods-list{
		width: 100%;
		height: 100%;
		overflow: hidden;
		background: #FFFFFF;
	}
	.goods-category-box{
		height: 97rpx;
		width: 100%;
		line-height: 97rpx;
		background: #fff;
	}
	.goods-category{
		width: 95%;
		margin: 0 auto;
		height: 100%;
	}
	.scroll-view{
		height: 80rpx;
	}
	.category-row{
		width: 94rpx;
		text-align: center;
		height: 68rpx;
		line-height: 68rpx;
		color: #777;
		font-size: 30rpx;
		float: left;
	}
	.category-row-act{
		color: #f55959;
		border-bottom: 8rpx solid #f55959;
	}
	.goods-box{
		width: 700rpx;
		margin: 0 auto;
		padding-bottom: 50rpx;
	}
	.goods {
		padding-top: 30rpx;
		border-bottom: 1px solid #e6e6e6;
	}
	.goods .user-info .head-pic{
		width: 68rpx;
		height: 68rpx;
		margin-left: 8rpx;
		margin-right: 16rpx;
		border-radius: 50%;
	}
	.goods .user-info .name{
		font-size: 34rpx;
		color: #3f4b75;
	}
	.goods .goods-cont{
		margin-left: 93rpx;
	}
	.goods .goods-cont .price .rmb{
		font-size: 30rpx;
		color: #f55959;
	}
	.goods .goods-cont .price .money{
		font-size: 40rpx;
		color: #f55959;
		margin-left: 5rpx;
	}
	.goods .goods-cont .price .type{
		font-size: 20rpx;
		color: #333333;
		background: #ebebeb;
		line-height: 34rpx;
		padding: 0 8rpx;
		margin-left: 10rpx;
	}
	.goods .goods-cont .describe{
		font-size: 30rpx;
		padding-top: 10rpx;
		padding-bottom: 25rpx;
	}
	.goods .goods-cont .other-info {
		justify-content: space-between;
		padding: 14rpx 0;
	}
	.goods .goods-cont .other-info .time{
		color: #656565;
		font-size: 28rpx;
		margin-right: 20rpx;
	}
	.goods .goods-cont .other-info .other{
		position: relative;
		width: 66rpx;
		height: 34rpx;
		background: #f7f7f7;
		border-radius: 50px;
	}
	.goods .goods-cont .other-info .other .rounds{
		position: relative;
		width: 66rpx;
		height: 34rpx;
	}
	.goods .goods-cont .other-info .other .rounds:after,.goods .goods-cont .other-info .rounds:before{
		content: '';
		position: absolute;
		top: 50%;
		left: 20rpx;
		margin-top: -4rpx;
		width: 7rpx;
		height: 7rpx;
		border-radius: 50px;
		background: #666666;
	}
	.goods .goods-cont .other-info .rounds:before{
		right: 20rpx;
		left: auto;
	}
	.goods .goods-cont .other-info .other .function{
		position: absolute;
		top: 0;
		right: -500px;
		background: #333333;
		height: 78rpx;
		color: #FFFFFF;
		font-size: 28rpx;
		width: 330rpx;
		border-radius: 10rpx;
		justify-content: center;
		transition: all .3s;
	}
	.goods .goods-cont .other-info .other .function.show{
		right: 10rpx;
	}
	.goods .goods-cont .other-info .other .function:after{
		content: '';
		position: absolute;
		top: 50%;
		margin-top: -7rpx;
		right: -8rpx;
		width:0;
		height:0;
		border-top:7rpx solid transparent;
		border-bottom:7rpx solid transparent;
		border-left:9rpx solid #333333;
	}
	.goods .goods-cont .other-info .other .function view{
		margin: 0 10rpx;
	}
	.goods .goods-cont .other-info .other .function image{
		width: 24rpx;
		height: 26rpx;
		margin-right: 4rpx;
	}
	.goods .goods-cont .other-info .wai{
		position: absolute;
		top: 50%;
		right: 83rpx;
		height: 78rpx;
		width: 340rpx;
		margin-top: -39rpx;
		overflow: hidden;
	}
	.goods .goods-cont .comment-cont{
		background: #f7f7f7;
		margin-bottom: 13rpx;
		border-radius: 6rpx;
		position: relative;
		margin-top: 18rpx;
		padding: 16rpx;
		box-sizing: border-box;
	}
	.goods .goods-cont .comment-cont:after{
		content: '';
		position: absolute;
		top: -8rpx;
		left: 10rpx;
		width:0;
		height:0;
		border-right:9rpx solid transparent;
		border-left:9rpx solid transparent;
		border-bottom:8rpx solid #f7f7f7;
	}
	.goods .goods-cont .comment-cont .li{
		padding-left: 10rpx;
		position: relative;
		flex-wrap: wrap
	}
	.goods .goods-cont .comment-cont .li .comment-nickname {
		color: #3f4b75;
		font-size: 30rpx;
	}
	.goods .goods-cont .comment-cont .li .comment-content {
		color: #333333;
		font-size: 28rpx
	}
	.goods .goods-cont .info-del{
		font-size: 28rpx;
		color: #656565;
		padding-left: 4rpx;
		padding-top: 5rpx;
	}
	.thumbnails {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
	}
	.thumbnails .thumbnail {
		width: 30%;
		height: 180rpx;
		margin: 4rpx;
		background-color: #757575;
		overflow: hidden;
	}
	.thumbnails .my-gallery{
		width: 250rpx;
		height: 400rpx;
		margin: 4rpx;
		background-color: #757575;
		overflow: hidden;
	}
	.thumbnails .gallery_img {
		width: 100%;
		height: 100%
	}
	.thumbnails .video,.thumbnails .videoposter{
		width: 400rpx;
		height: 300rpx;
	}
	.head-market{
		padding: 34rpx;
		padding-top: 0;
		background: #FFFFFF;
	}
	.head-market .title{
		font-size: 28rpx;
		padding-bottom: 20rpx;
		padding-top: 15rpx;
		display: flex;
		align-items: center;
	}
	.head-market .title image{
		width: 32rpx;
		height: 27rpx;
		margin-right: 10rpx;
	}
	
	.reply-input{
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 80rpx;
		border-top: solid 1px #bbb;
		overflow: hidden;
		padding: 5rpx;
		background-color: #F4F5F6;
		justify-content: space-between;
	}
	.input-text {
		flex: 1;
		background: #fff;
		padding: 10rpx !important;
		font-family: verdana !important;
		overflow: hidden;
		border-radius: 15rpx;
		margin-left: 20rpx;
	}
	.send-comment{
		background-color: #007AFF;
		text-align: center;
		line-height: 60rpx;
		color: #FFFFFF;
		width: 80rpx;
		height: 60rpx;
		border-radius: 5px;
		font-size: 24rpx;
		margin: 0 20rpx;
	}
	.comment_text{
		color: #000;
		display: inline-block;
		margin: 0rpx 10rpx;
	}
	.m-no-data image{
		width: 100%;
		height: 100%;
	}
	.foot {
		position: fixed;
		width: 100%;
		min-height: 90rpx;
		left: 0rpx;
		bottom: 0rpx;
		overflow: hidden;
	}
	
	.cont {
		height: 100%;
		box-shadow: 0 2px 16px rgba(65,65,65,0.1);
		border-radius: 10rpx;
	}
	
	.cont-row{
		height: 73rpx;
		line-height: 73rpx;
		background: #f3f3f3;
		color: #333;
		font-size: 28rpx;
	}
	.cont-left{
		float: left;
	}
	.cont-right{
		float: left;
	}
	.cont-view{
		text-align: center;
		width: 49%;
	}
	.cont-foot{
		background: #fff;
	}
	.cont-type{
		font-size: 32rpx;
	}
	.cont-price{
		color: #e72020;
	}
	.cont-line{
		float: right;
		background: #dcdcdc;
		height: 38rpx;
		width: 2rpx;
		position: relative;
		top: 19rpx;
	}
	.head-info{
		width: 100%;
		height: 326rpx;
		position: relative;
		z-index: 1;
	}
	.head-info .head_bg{
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: -1;
	}
	.head-info .user_head{
		position: absolute;
		bottom: -28rpx;
		right: 35rpx;
		z-index: 3;
	}
	.head-info .user_head .uname{
		font-size: 34rpx;
		color: #FFFFFF;
		height: 64rpx;
		line-height: 64rpx;
		background: #e51e1e;
		padding-right: 24rpx;
		padding-left: 10rpx;
		position: relative;
		z-index: 1;
	}
	.head-info .user_head .uname:after,.head-info .user_head .uname:before{
		content: '';
		position: absolute;
		z-index: -1;
		top: 0;
		width: 326rpx;
		height: 64rpx;
		background-image: url('~@/static/icons/transfer/user_bg.png');
		background-position: right center;
		background-size: 326rpx 64rpx;
		background-repeat: no-repeat;
	}
	.head-info .user_head .uname:after{
		right: -154rpx;
	}
	.head-info .user_head .uname:before{
		left: -66rpx;
		width: 66rpx;
		background-position: left center;
	}
	.head-info .user_head .upic{
		width: 121rpx;
		height: 121rpx;
		background: #b5b5b5;
		box-shadow: 0 1px 7px rgba(141,141,141,0.45);
		overflow: hidden;
		position: relative;
		z-index: 5;
		border-radius: 50%;
	}
	.head-info .user_head .upic image{
		width: 100%;
		height: 100%;
	}
	.m-full-loading{
		background: rgba(255,255,255,0);
	}
	.rule-icon{
		position: fixed;
		bottom: 50rpx;
		right: 0;
		width: 154rpx;
		height: 154rpx;
		display: block;
	}
	/* 规则弹框 */
	.rule-mark{
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		background: rgba(0,0,0,.5);
		height: 100%;
		z-index: 1;
	}
	.g-popup-rule {
	    position: fixed;
	    top: 50%;
	    left: 50%;
	    transform: translate(-50%, -50%);
	    background: #fff;
	    border-radius: 5px;
	    width: 70%;
	    padding: 20px;
	    z-index: 100;
		font-size: 28rpx;
	}
	
	.g-popup-rule>view {
	    padding-left: 10px;
	    margin-bottom: 10px;
	}
	
	.g-popup-rule:after {
	    content: '';
	    display: block;
	    width: 3px;
	    height: 15px;
	    background: #d71311;
	    position: absolute;
	    top: 21px;
	    left: 10px;
	}
	.g-popup-rule .content{
		max-height: 500rpx;
	}
	.g-popup-rule .g-popup-close {
	    padding: 5px;
	    border-radius: 100px;
	    border: 3px solid #fff;
	    position: absolute;
	    bottom: -60px;
	    left: 50%;
	    transform: translateX(-50%);
		text-decoration: none;
	}
</style>
<template>
	<view>
		<view class="head-info">
			<block v-for="(item,index) in adData" :key="index" >
				<image class="head_bg" :src="item.thumb"></image>
			</block>
			<navigator open-type="navigate" url="/pages/transfer/user_index" class="user_head flex">
				<view class="uname">{{userInfo.realname||userInfo.nickname}}</view>
				<view class="upic"><image :src="userInfo.head_pic_text||'../../static/images/no_login.png'"></image></view>
			</navigator>
		</view>
		<view class="head-market">
			<view class="title"><image src="../../static/icons/transfer/goals_icon.png"></image>贵金属行情</view>			
			<view class="cont">
				<view class="cont-row cont-foot" v-for="(item,index) in goldData.list" :key="index">
					<view class="cont-view cont-left cont-type">
						{{item.name}}<text class="cont-line"></text>
					</view>
					<view class="cont-view cont-right cont-price">
						{{item.money}}
					</view>
				</view>
			</view>
		</view>
		<!-- <button @click="showDrawer">显示抽屉</button> -->
		<view class="goods-list">
			<!-- <button @click="showDrawer">显示抽屉</button> -->
			<view class="goods-box">
				<view class="goods" v-for="(item,index) in datalist" :key="index">
					<view class="user-info flex">
						<image :src="item.head_pic_text?item.head_pic_text:'../../static/images/no_login.png'" class="head-pic"></image>
						<view class="name">{{item.member_name}}</view>
					</view>
					<view class="goods-cont">
						<view class="describe" @tap="to_detail(item.id)">{{item.content}}</view>
						<view class="thumbnails">
							<video :id="String(index)" class="video" v-if="item.video_src" :src="item.video_src" :poster="item.photos_text[0]" @play="handle(index)"></video>
							<view v-if="!item.video_src" :class="item.photos_text.length === 1?'my-gallery':'thumbnail'" v-for="(image, idx) in item.photos_text" :key="idx">
								<image class="gallery_img" lazy-load mode="aspectFill" :src="image" @tap="previewImage(item.photos_text,idx,item.video_src,item.id)"></image>
							</view>
						</view>
						<view class="info-del" v-if="item.member_id == userInfo.member_id" @tap="del(item.id)">删除</view>
						<view class="other-info flex">
							<view class="time">{{item.create_time}}</view>
							<view class="other">
								<view class="rounds" :data-index="index" @tap="showFunction"></view>
								<view class="wai">
									<view class="function flex" :class="{'show':activeNum == index}">
										<navigator open-type="navigate" :url="'/pages/transfer/entrust_confirm?goods_id='+item.id" class="flex"><image src="../../static/icons/transfer/list_i2.png"></image>委托</navigator>
										<view class="flex" @tap="to_loan(item.id)"><image src="../../static/icons/transfer/list_i3.png"></image>质押</view>
										<view class="flex" :data-index="index" :data-member-name="item.member_name" :data-transfer-id="item.id" @tap="comment"><image src="../../static/icons/transfer/list_i1.png"></image>评论</view>
									</view>
								</view>
							</view>
						</view>
						<view class="comment-cont" v-if="item.comment && item.comment.length != 0">
							<view class="li flex" v-for="(comment,comment_index) in item.comment" :key="comment_index" @tap="reply(index,comment_index, comment, item)">
								<text class="comment-nickname" v-if="comment.pid == 0">{{comment.member_name}}： <text class="comment-content">{{comment.content}}</text></text>
								<text class="comment-nickname"  v-else>{{comment.member_name}} <text class="comment_text">回复</text> {{comment.to_member_name}}：<text class="comment-content">{{comment.content}}</text></text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 规则弹框 -->
		<image src="../../static/icons/transfer/rule-icon.png" class="rule-icon" @tap="showRule"></image>
		
		<view class="rule-mark" v-if="ruleShow" @touchmove.stop=""  @tap="showRule"></view>
		<view class="g-popup-rule" v-if="ruleShow" @touchmove.stop="">
		    <view>{{ruleData.title}}</view>
		    <scroll-view class="content" scroll-y>
		    	<!-- <uParse :content="ruleData.content" @preview="preview" /> -->
				<view v-html="ruleData.content"></view>
		    </scroll-view>
		    <view class="g-popup-close" @tap="showRule">
		        <close size="40" color="#fff"></close>
		    </view>
		</view>
		
		
		<!-- <view v-if="isShowReInput">
			<view class="reply-input flex">
				<input class="input-text" type="text" v-model="replyValue" :focus="focus" :placeholder="placeholder"></input>
				<view class="send-comment" @tap="sendMessge">发送</view>
			</view>
		</view> -->
		<view class="foot" v-if="showInput">
			<chat-input ref="child1" @send-message="send_comment" :focus="focus" :placeholder="input_placeholder"></chat-input>
		</view>
		<view class="m-full-loading" v-if="bIsShowLoading">
			<view class="m-loading">
				<image src="../../static/images/loading.gif" mode="widthFix"></image>
			</view>
		</view>
		<view class="m-no-data" v-if="showNodata">
			<image src="../../static/images/no_data.png" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	var view;
	import henglang from '@/common/common.js';
	import uParse from '@/components/uParse/src/wxParse.vue';
	export default {
		data() {
			return {
				datalist: [],	// 列表数据
				page: 1,
				totalPages: 1,
				loadtype: 'normal',	// 加载数据方式
				bIsShowLoading: false,
				search_data: {},	// 搜索的数据
				category_data: [],
				current_cate_id: 0,
				route_key: '0',
				showNodata:false,
				goldData:[],
				activeNum:-1,
				
				input_placeholder: '评论', //占位内容
				focus: false, //是否自动聚焦输入框
				is_reply: false, //回复还是评论
				showInput: false, //评论输入框
				screenHeight: '', //屏幕高度(系统)
				platform: '',
				windowHeight: '' ,//可用窗口高度(不计入软键盘)
				this_comment: []	,// 当前点击的comment
				comment_index: 0,
				transfer_id: 0,
				load_data: 0,
				videoCur:'-1',
				video: null,
				userInfo:[],
				adData:[],
				ruleShow: false,
				ruleData:[]
			}
		},
		components:{
			uParse
		},
		computed: {
		  exstring() {
			  return '0'
		  }
		},
		onLoad(options) {
			let that = this
			henglang.get('Pawn/getGoldPrice',{}, false, function(res){
				if(res.data.code == 0){
					that.goldData = res.data;
				}
			})
			henglang.get('Pawn/getAd',{}, false, function(res){
				if(res.data.code == 0){
					that.adData = res.data.data;
				}
			})
			henglang.get('pawn/saleBuyRule',{}, false, function(res){
				if(res.data.code == 0){
					that.ruleData = res.data.data;
				}
			})
			if(options.cate_id) {
				that.cate_id = options.cate_id;
				that.search_data.cate_id = options.cate_id;
			}
			if(options.keyword) {
				that.search_data.keyword = options.keyword;
			}
			that.getList(that.search_data)
			that.video = uni.createVideoContext(that.videoCur);
			that.userInfo = uni.getStorageSync('userInfo')
			
			
		},
		methods:{
			preview(){},
			to_loan(transfer_id){
				uni.navigateTo({
					url: '/pages/Loan/Loan_apply?id=' + transfer_id
				})
			},
			back(){
				uni.switchTab({
					url:'/pages/jewel/index/index'
				})
			},
			to_detail(id){
				uni.navigateTo({
					url: '/pages/transfer/transfer_view?id=' + id
				})
			},
			click_category(e){
				let cate_id = e.currentTarget.dataset.cateId;
				this.current_cate_id = cate_id;
				this.search_data.cate_id = cate_id;
				this.loadtype = 'normal';
				this.page = 1;
				this.totalPages = 1;
				this.getList(this.search_data);
			},
			search_keyword(e){
				let keyword = e.target.value;
				this.loadtype = 'normal';
				this.search_data.keyword = keyword;
				this.getList(this.search_data);
			},
			getList(data){
				let that = this;
				if(that.page <= that.totalPages){
					that.bIsShowLoading = true;
					henglang.post('Pawn/transfer_list', data, false,function(res){
						that.bIsShowLoading = false;
						let data = res.data;
						if(res.data.count == 0){
							that.showNodata = true
							that.datalist = []
							return false
						}
						if(that.loadtype == 'plus') {
							that.datalist = that.datalist.concat(data.data);
						}else{
							that.datalist = data.data;
							that.totalPages = data.total_pages;
							uni.hideNavigationBarLoading();
							uni.stopPullDownRefresh();
						}
					})
				}else{
					return false
				}
			},
			previewImage(list,index,video_src,id) {
				if(video_src){
					this.to_detail(id)
					
				}else{
					let current = list[index]
					uni.previewImage({
						current: current,
						urls: list
					});
				}
			},
			showFunction(e){
				let index = e.currentTarget.dataset.index;
				if(this.activeNum == index){
					this.activeNum = -1
				}else{
					this.activeNum = index
				}
			},
			comment(e) {
				let that = this
				if(!uni.getStorageSync('userInfo')) {
					uni.showToast({
						title:'请先登录后再操作',
						icon:'none',
						duration:3000,
						success() {
							uni.navigateTo({
								url: '/pages/user/login'
							});
						}
					})
				}else{
					that.showInput = true; //调起input框
					that.focus = true;
					that.activeNum = -1
					that.input_placeholder = '回复: ' + e.currentTarget.dataset.memberName;
					that.comment_index = e.currentTarget.dataset.index;
					that.transfer_id = e.currentTarget.dataset.transferId;
				}
				
			},
			reply(index, comment_index, comment, item) {
				let that = this
				if(!uni.getStorageSync('userInfo')) {
					uni.showToast({
						title:'请先登录后再操作',
						icon:'none',
						duration:3000,
						success() {
							uni.navigateTo({
								url: '/pages/user/login'
							});
						}
					});
					return false;
				}
				let member_id = uni.getStorageSync('userInfo').member_id;
				let member_name = '';
				if(member_id == comment.member_id) {	// 如果点击了自己的评论，不作回复，而是增加一个新评论
					member_name = '回复: ' + item.member_name;
				}else{
					member_name = '回复: ' + comment.member_name;
				}
				that.transfer_id = item.id;
				that.this_comment = comment;
				that.input_placeholder = member_name;
				that.is_reply = true; //回复中
				that.focus = true;
				that.showInput = true; //调起input框
				that.comment_index = index;
			},
			send_comment: function(message) {
				if(message.content!=''){
					let that = this;
					let data = {
						content: message.content,
						transfer_id: that.transfer_id,
					};
					if(this.this_comment.id) {
						data.comment_id = this.this_comment.id;
					}
					that.bIsShowLoading = true;
					henglang.get('pawn/addComment', data, false, function(res){
						that.bIsShowLoading = false;
						that.init_input()
						if(res.data.code != 'ok'){
							henglang.showToast(res.data.msg, 1000);
						}else{
							that.datalist[that.comment_index]['comment'] = res.data.comment;
						}
					})
				}
			},
			init_input() {
				this.showInput = false;
				this.focus = false;
				this.is_reply = false;
			},
			handle(index){
				let that = this
				that.videoCur = String(index);  
				let newVideo = uni.createVideoContext(that.videoCur); 
				if (that.video.id !== newVideo.id) {  
					newVideo.play();  
					that.video.pause(); 
				}
				that.video = newVideo;
			},
			showRule() {
				// #ifndef H5
				this.createView()
				// #endif
				// #ifdef H5
				this.ruleShow = !this.ruleShow;
				// #endif
			},
			del(id){
				let that = this
				uni.showModal({
				    title: '提示',
				    content: '是否要删除',
				    success: function (res) {
				        if (res.confirm) {
				            henglang.get('Pawn/delPublish', {id:id}, false, function(res){
								if(res.data.code == 0){
									that.getList();
								}
				            })
				        }
				    }
				});
			},
			showDrawer() {
				uni.getSubNVueById('drawer').show('slide-in-left', 200);
			},
			createView(){
				
				view = new plus.nativeObj.View('test',{top:'0',left:'0px',height:'100%',width:'100%'},
					[{
						tag: 'rect',  
						id: 'bg1',  
						position: {  
							top: '0',  
							left: '0px',  
							width: '100%',  
							height: '100%'  
						},  
						rectStyles: {  
							color: 'rgba(0,0,0,0.5)'  
						}  
					},
					{
						tag: 'rect',  
						id: 'bg2',  
						position: {  
							top: '30%',  
							left: 'auto',  
							width: '300px',  
							height: '250px'  
						},  
						rectStyles: {  
							color: '#fff',  
							radius: '5px'
						} 
					},
					{
						tag:'img',
						id:'img',
						src:'/static/icons/jewel/sign_close.png',
						position:{
							top:'68%',
							left:'auto',
							width:'43px',
							height:'43px'
						}
					}
					]
				);
				var richtext = '<font color="#000000" style="font-size:14px;">'+this.ruleData.content+'</font>';
				// var richtext = '<font color="#FF0000" style="font-size:10px;">文本</font>';
				view.drawRichText(richtext, {top:'32%',left:'auto',width:'250px',height:'wrap_content'});
				
				view.addEventListener("click", function(e) {
					view.hide();
				}, false);
				view.show();
			}
		},
		onBackPress(options) {
		    if (options.from === 'navigateBack') {  
		        return false;  
		    }  
		    this.back();  
		    return true;  
		},
		onNavigationBarButtonTap(e) {
			let that = this;
			if (e.index == 0) {
				that.bIsShowLoading = true;
				henglang.get('pawn/check_auth', {}, false, function(res){
					that.bIsShowLoading = false;
					if(res.data.code == 'ok'){
						uni.navigateTo({
							url:'/pages/transfer/transfer_publish'
						})
					}else{
						henglang.showToast(res.data.msg, 1000);
					}
				})
				
			}
		},
		onPageScroll(e){
			if(e.scrollTop){
				this.activeNum = -1
				// this.focus = false;
			}
		},
		// 上拉加载
		onReachBottom(){
			let that = this
			that.loadtype = 'plus';
			that.page++;
			that.search_data.page = that.page;
			if(that.datalist.length === 0) return false
			that.getList(that.search_data);
			that.bIsShowLoading = false
		},
		onPullDownRefresh() {
			let that = this
		    that.bIsShowLoading = true;
		    that.getList();
		},
		onUnload() {
			// #ifdef APP-PLUS
			view.hide()
			// #endif
			
		},
		onHide() {
			// #ifdef APP-PLUS
			view.hide()
			// #endif
		}
	}
</script>